package fun.werfamily.wf.user.core.domain.enums;


import fun.werfamily.wf.base.exception.CommonError;

/**
 * @Author: Mr.WenMing Zhang
 * @Date: 2022/07/27 17:37
 * @Description:
 **/
public enum ResponseCodeEnum implements CommonError {
    TOKEN_IS_EMPTY("1000", "Token为空，需要登录", "Token为空，需要登录"),
    TOKEN_IS_INVALID("1001", "Invalid Token 无效token", "Invalid Token 无效token"),
    USER_NOT_EXITS("1002", "用户信息不存在", "用户信息不存在"),
    ACCOUNT_OR_PASSWORD_ERROR("1003", "用户名或密码错误", "用户名或密码错误"),
    VERIFY_CODE_INVALID("1004", "验证码已过期", "验证码已过期"),
    USER_ALREADY_EXITS("1005", "用户已存在" , "您已注册,请直接登录"),
    VERIFY_CODE_ERROR("1006", "验证码错误", "验证码错误"),
    PASSWORD_PATTERN_ERROR("1007", "密码格式错误", "密码格式错误"),
    MESSAGE_SEND_SUCCESS("1008", "验证码已发送，请注意查收", "验证码已发送，请注意查收"),
    DATA_IS_NOT_EXISTS("1009", "数据不存在", "数据不存在"),
    ;
    private String code;
    private String msg;

    ResponseCodeEnum(String code, String msg, String friendlyMsg) {
        this.code = code;
        this.msg = msg;
        this.friendlyMsg = friendlyMsg;
    }

    private String friendlyMsg;

    @Override
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String getFriendlyMsg() {
        return friendlyMsg;
    }

    public void setFriendlyMsg(String friendlyMsg) {
        this.friendlyMsg = friendlyMsg;
    }
}
